package me.hacket.netrequestpro.bean;

import android.support.annotation.IntDef;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

public class LogMessageResponse {

    Result result;

    public static class Result {

        @LOG_UPLOAD_RESPONSE_CODE
        public int code;

        @Override
        public String toString() {
            return "Result{" +
                    "code=" + code +
                    '}';
        }
    }

    @Override
    public String toString() {
        return "LogMessageResponse{" +
                "result=" + result +
                '}';
    }

    /**
     * 请求成功
     */
    public static final int RESPONSE_CODE_SUCCESS = 0;
    /**
     * 请求失败
     */
    public static final int RESPONSE_CODE_FAIL = -1;
    /**
     * 服务器繁忙
     */
    public static final int RESPONSE_CODE_SERVER_BUSY = -2;
    /**
     * 参数错误
     */
    public static final int RESPONSE_CODE_PARAM_ERROR = -3;

    @IntDef({RESPONSE_CODE_SUCCESS, RESPONSE_CODE_FAIL, RESPONSE_CODE_SERVER_BUSY, RESPONSE_CODE_PARAM_ERROR})
    @Documented
    @Target({ElementType.LOCAL_VARIABLE, ElementType.FIELD, ElementType.PARAMETER})
    @Retention(RetentionPolicy.SOURCE)
    public @interface LOG_UPLOAD_RESPONSE_CODE {
    }

}
